package com.baizhi.cmfz.mapper;

import com.baizhi.cmfz.entity.CmfzAdmin;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CmfzAdminMapper extends BaseMapper<CmfzAdmin> {

    //根据用户名和密码查询用户
    public CmfzAdmin selectByNameAndPwd(@Param("username") String username, @Param("password") String password);

    //表连接查询用户角色 自定义sql分页
    public IPage<CmfzAdmin> selectAdminAndRole(IPage<CmfzAdmin> page, @Param(Constants.WRAPPER) Wrapper<CmfzAdmin> queryWrapper);

}
